function changeThemeFun(themeName) {/* 更换主题 */
	var $easyuiTheme = $('#easyuiTheme');
	var url = $easyuiTheme.attr('href');
	var href = url.substring(0, url.indexOf('themes')) + 'themes/' + themeName
			+ '/easyui.css';
	$easyuiTheme.attr('href', href);
	// 根据主题切换head的背景颜色
	var color = "";
	if (themeName == 'metro-blue') {
		color = "#CFE2EF";
	} else if (themeName == 'metro-red') {
		color = "#F0E5E0";
	} else if (themeName == 'metro-gray') {
		color = "#F5F5F1";
	} else if (themeName == 'metro-orange') {
		color = "#FCF7D8";
	} else if (themeName == 'metro-green') {
		color = "#C3DE9E";
	}
	$("#topHead").css("background-color", color);
	
	var $iframe = $('iframe');
	if ($iframe.length > 0) {
		for (var i = 0; i < $iframe.length; i++) {
			var ifr = $iframe[i];
			$(ifr).contents().find('#easyuiTheme').attr('href', href);
		}
	}

	$.cookie('easyuiThemeName', themeName, {
		expires : 7
	});
};
if ($.cookie('easyuiThemeName')) {
	changeThemeFun($.cookie('easyuiThemeName'));
}